package com.example.test.Dao;

import com.example.test.mapper.PicurlMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;

@Primary
@Mapper
public interface PicDao extends PicurlMapper {

    //根据goodId查询brandName
    @Select("SELECT\n" +
            "\tpicUrl\n" +
            "FROM\n" +
            "\tpicurl\n" +
            "WHERE\n" +
            "\tgoods_id = #{goodId}\n" +
            "AND\n" +
            "\tdeleted = 0\n")
    String getUrlById(Long goodId);
}
